// 权限
import { storeToRefs } from "pinia";
import { useDemoStore } from "@/store/toBack";
export const showBtnsFn = (route: string) => {
    // 权限
    const backStore = useDemoStore();
    let arr = [];
    for (let i in backStore.currentRouteObj) {
        if (i.match(/\?/)) {
            console.log(1111);
            i = i.split("?")[0];
        }

        if (i == route) {
            arr = backStore.currentRouteObj[i];
            break;
        }
    }
    const obj = {};
    for (let i = 0; i < arr.length; i++) {
        obj["btn" + arr[i].description] = arr[i].description;
    }

    return obj;
};
